Dynomotion

Group: DynoMotion Message: 8610 From: yanvrno@frontier.com Date: 11/11/2013
Subject: Dual spindle control
I looked for an example on how to control two separate spindles. Is it possible to distinguish in the spindle.c program the particular spindle I need to address? Someway to set and pass a variable that lets the program function know, to control either DAC(3) or DAC(4).

Also the enum values seem different for Mach3 and KmotionCNC so I find I will need to use two spindle.c programs. Not sure why that is.
Also the spindle.c example that we are passing 12 values but only seem to be using 3. Guess I am trying to figure out why and if I can pass/use one that would be functional for my needs.

Looking like a special rewrite of KmotionCNC to get a program set-able checkbox to determine what spindle I need to control. Or maybe a new set of spindle M codes for the second spindle.

Maybe I need to think of them as two axis's and not as two spindles.

Thanks for any info.
Group: DynoMotion Message: 8611 From: Tom Kerekes Date: 11/11/2013
Subject: Re: Dual spindle control
One approach might be to have a Virtual bit select the active Spindle.  Two MCodes might be configured to select the active Spindle from within GCode.  Two User Buttons might also be configured to easily select the Spindle.

Your Spindle C code would then check the Virtual Bit to determine which Spindle to Drive and so forth.

The Spindle Control code is handled differently for Mach3 and KMotionCNC.   For KMotionCNC 4 different programs are required.  One each for M3, M4, M5, and S.  With Mach3 only one program is required but the program must decode the message to determine which function it should perform.

HTH
Regards
TK